Repository navigation
PP-3: split run.py into the run package (move only) - #109
Merged
Merged
Conversation
Spec revision 4, section 8 PP-3 (plan-structure audit, section 5). No behaviour change: every function and class is moved as it was, reviewable with git diff --color-moved. - run/preflight.py: Preflight, SamplePlane, preflight, sample_planes, _exclusion_issues, _normalise. - run/pipeline.py: run_experiment. - run/result.py: RunResult. - run/reuse.py: _load_previous, _describe_histogram. - run/rows.py: _read_file, _bin_count, _range_issues, _pixel_issues, _row_order. - run/publish.py: _staged_outputs, _publish_outputs, _OutputRollbackError. - run/__init__.py keeps the module docstring and re-exports the public names, so `from morphobricks_preprocessing.run import ...` still works. Tests now patch the submodule that uses a name: run.rows.iter_xyc_planes, run.pipeline.file_sha256 and the like. tools/check.py --rename OLD=NEW re-keys the baseline entries of moved code; it never adds or raises one. Each new module has a declared layer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
The AGENTS.md testing note keeps PP-3's wording: spy on `run.rows.iter_xyc_planes`, the submodule that uses the name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
Contributor
Author
|
Independent review: approved, no fix needed beyond the merge of main ( Move only, verified
Merge of main ( Gate on
Follow-up: Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is PP-3 of the v0.4.0 plan (
preprocessing-design-v0.4.mdrevision 4, §8; plan-structure audit §5). It only moves code: no behaviour change. Review it withgit diff --color-moved.It is stacked on PP-2 (#66), which is stacked on PP-0 (#65, based on main). Merge order: #65, #66, then this PR.
Summary
run.py(895 lines after PP-2) becomes the packagemorphobricks_preprocessing/run/:preflight.py:Preflight,SamplePlane,preflight,sample_planes,_exclusion_issues,_normalisepipeline.py:run_experimentresult.py:RunResultreuse.py:_load_previous,_describe_histogramrows.py:_read_file,_bin_count,_range_issues,_pixel_issues,_row_orderpublish.py:_staged_outputs,_publish_outputs,_OutputRollbackError__init__.py: keeps the module docstring and re-exports the public names, sofrom morphobricks_preprocessing.run import …andmorphobricks_preprocessing.run_experimentwork as before.Other changes:
pyproject.toml.result.pyis pure,pipeline.pyis orchestration, and the rest are io.run.rows.iter_xyc_planesorrun.pipeline.file_sha256, instead ofrun.<name>. No assertion changed.tools/check.py --rename OLD=NEW: a new option that re-keys the baseline entries of moved code, so a move does not count as a new violation. It never adds or raises an entry, and--update-baselinethen drops what the move removed.Notes for review
run_experimentis still 300+ lines (complexity 73). Cutting it below 60 lines is PP-7's job.Tests
tools/check.py --rules, pytest with.[dev,notebook,zarr]):Generated by Claude Code